package com.duapk.common;

import org.apache.commons.lang.builder.ReflectionToStringBuilder;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

/**
 * 搜索记录对象
 * 
 * @author yangfeng
 * 
 */
public class Result implements java.io.Serializable {

	private static final long serialVersionUID = -1502272494033940405L;

	@Expose
	@SerializedName(value = "Title")
	private String title;

	@Expose
	@SerializedName(value = "HighlightTitle")
	private String highlightTitle;

	@Expose
	@SerializedName(value = "Description")
	private String description;

	@Expose
	@SerializedName(value = "DetailUrl")
	private String detailUrl;

	@Expose
	@SerializedName(value = "Category")
	private String category;

	@Expose
	@SerializedName(value = "Logo")
	private String logo;

	@Expose
	@SerializedName(value = "Version")
	private String version;

	@Expose
	@SerializedName(value = "Size")
	private String size;
	
	@Expose
	@SerializedName(value = "Star")
	private String star;
	
	@Expose
	@SerializedName(value = "Pubtime")
	private String pubtime;
	
	@Expose
	@SerializedName(value = "Score")
	private float score;

	/**
	 * 下一条记录（记录标题相同的记录)
	 */
	@Expose
	@SerializedName(value = "NextResult")
	private Result nextResult;

	public String getDownloadUrl() {
		return downloadUrl;
	}

	public void setDownloadUrl(String downloadUrl) {
		this.downloadUrl = downloadUrl;
	}

	@Expose
	@SerializedName(value = "DownloadUrl")
	private String downloadUrl;

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getDetailUrl() {
		return detailUrl;
	}

	public void setDetailUrl(String detailUrl) {
		this.detailUrl = detailUrl;
	}

	@Override
	public String toString() {
		return ReflectionToStringBuilder.toString(this);
	}

	public String getHighlightTitle() {
		return highlightTitle;
	}

	public void setHighlightTitle(String highlightTitle) {
		this.highlightTitle = highlightTitle;
	}

	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	public String getLogo() {
		return logo;
	}

	public void setLogo(String logo) {
		this.logo = logo;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getSize() {
		return size;
	}

	public void setSize(String size) {
		this.size = size;
	}

	public void addNext(Result nextResult) {
		Result tmp = this;
		while (tmp.nextResult != null) {
			tmp = tmp.nextResult;
		}
		tmp.nextResult = nextResult;
	}

	public String getStar() {
		return star;
	}

	public void setStar(String star) {
		this.star = star;
	}

	public float getScore() {
		return score;
	}

	public void setScore(float score) {
		this.score = score;
	}

	public String getPubtime() {
		return pubtime;
	}

	public void setPubtime(String pubtime) {
		this.pubtime = pubtime;
	}
}
